/*
 * Adminica UI
 *
 * Copyright (c) 2010 Tricycle Interactive
 *
 * http://www.tricycle.ie
 *
 * This file configures all the different jQuery scripts used in the Adminica Admin template. Links to the scripts can be found at the beginning of each function
 *
 */
 
 
$(function() {
    // Content Box Toggle Config 
    $("a.toggle").click(onToggleClick);
    $("a.toggle").siblings('.box_head').addClass('clickable').click(onToggleClick);
        
    function onToggleClick(){
        var $this = $(this);
        if (!$this.is('a.toggle')) {
            $this = $(this).siblings('a.toggle');
        }
        
        $this.toggleClass("toggle_closed").next().slideToggle("slow");
        $this.siblings(".box_head").find('click-to-expand').toggleClass("toggle_closed");
        $this.siblings(".box_head").removeClass("round_top").toggleClass("round_all");
        return false; //Prevent the browser jump to the link anchor
    }
});